import 'babel-polyfill'
import Vue from 'vue'

import 'normalize.css'
import '@/styles/index.scss'

import VChart from '@/plugins/v-chart'
Vue.component('v-chart', VChart)

import MakingChart from '@/components/MakingChart'
import GenerateChart from '@/components/GenerateChart'

const install = Vue => {
  Vue.component(MakingChart.name, MakingChart)
  Vue.component(GenerateChart.name, GenerateChart)
}

if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export { install, MakingChart, GenerateChart }

export default {
  install,
  MakingChart,
  GenerateChart
}
